# Copyright (c) 1998 Lawrence Livermore National Security, LLC and other
# HYPRE Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)


#
# Range/domain grid sketch:
#
# -------------------------             -------------
# |           |           |             |           |
# |           |           |             |           |
# |     *     |   (1,1)   |             |   (0,1)   |
# |           |           |             |           |
# |           |           |             |           |
# -------------------------             -------------
# |           |           |             |           |
# |           |           |             |           |
# |   (0,0)   |     *     |             |   (0,0)   |
# |           |           |             |           |
# |           |           |             |           |
# -------------------------             -------------
#
#         (Part 0)                         (Part 0)
#
# Matrix: 3-pt with variable off-diagonal coefficients and constant diagonal
#
############################################################

# GridCreate: ndim nparts
GridCreate: 2 1

# GridSetExtents: part ilower(ndim) iupper(ndim)
GridSetExtents: 0 (0- 0-) (1+ 1+)

# GridSetVariables: part nvars vartypes[nvars]
GridSetVariables: 0 1 [0]

############################################################

# StencilCreate: nstencils sizes[nstencils]
StencilCreate: 1 [3]

# StencilSetEntry: stencil_num entry offset[ndim] var value
StencilSetEntry: 0  0 [ 0  0] 0  1.0
StencilSetEntry: 0  1 [-1  0] 0  0.5
StencilSetEntry: 0  2 [ 1  0] 0  0.5

############################################################

# GraphSetStencil: part var stencil_num
GraphSetStencil: 0 0 0

############################################################

# MatrixSetDomainStride: part stride[ndim]
MatrixSetDomainStride: 0 [2 1]

# MatrixSetRangeStride: part stride[ndim]
MatrixSetRangeStride: 0 [1 1]

# MatrixSetConstantEntries: part nentries entries(nentries)
MatrixSetConstantEntries: 0 1 [0]

# MatrixSetValues: boundary conditions
#   part ilower(ndim) iupper(ndim) stride[ndim] var entry value
# East BCs
#MatrixSetValues: 1 (1+ 0-) (1+ 1+) [1 1] 0 2 0.0

# West BCs
#MatrixSetValues: 0 (0- 0-) (0- 1+) [1 1] 0 1 0.0

############################################################

# ProcessPoolCreate: num_pools
ProcessPoolCreate: 1

# ProcessPoolSetPart: pool part
ProcessPoolSetPart: 0 0
############################################################
